<HTML><HEAD><TITLE>open_receiver_init(+SendPort, +InitialMessages, -InitialMessagesTail, -ReceivePort)</TITLE>
</HEAD><BODY>[ <A HREF="index.html">library(notify_ports)</A> | <A HREF="../../index.html">Reference Manual</A> | <A HREF="../../fullindex.html">Alphabetic Index</A> ]
<H1>open_receiver_init(+SendPort, +InitialMessages, -InitialMessagesTail, -ReceivePort)</H1>
Create a receiver for a given notification sender
<DL>
<DT><EM>SendPort</EM></DT>
<DD>a send port structure
</DD>
<DT><EM>InitialMessages</EM></DT>
<DD>the head of a list of initial messages
</DD>
<DT><EM>InitialMessagesTail</EM></DT>
<DD>the tail of the list of initial messages
</DD>
<DT><EM>ReceivePort</EM></DT>
<DD>a variable, will be bound to a structure
</DD>
</DL>
<H2>Description</H2>

    This predicate creates a receive port listening to messages sent
    via the specified send port.  The new receive port will receive
    all messages that are sent via the send port after the receiver
    has been opened.  Messages that were sent before the receiver has
    been opened will not be received by this receiver.
    <P>
    In addition to open_receiver/2, there is a difference list pair
    (InitialMessages and InitialMessagesTail) which can be used to
    fake a sequence of initial message that will be received on
    the receive port without actually having been sent from the
    associated send port. This feature can be used to bring the
    message receiving agent into a particular starting state.
    
<H2>See Also</H2>
<A HREF="../../lib/notify_ports/open_receiver-2.html">open_receiver / 2</A>
</BODY></HTML>
